﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using SwenAssigment.Classes;
using System.Collections;
namespace SwenAssigment
{
    public partial class GuestExist : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["mystat"] != null)
            {
                Label1.Text = Session["mystat"].ToString();
                Label1.Visible = true;
                Session["mystat"] = null;
            }
        }

        protected void Button3_Click(object sender, EventArgs e)
        {
            string temp = TextBox1.Text;
            string s = "select * from Guest where First_Name like '%" + temp + "%' or Last_name like '%" + temp + "%'";
            RADcon con = new RADcon();
            ArrayList al = con.gretrieve(s);
            GridView1.DataSource = al;
            GridView1.DataBind();
        }
    }
}